<template>
    <my-table :data="tableData">
        <el-table-column
            prop="filename"
            label="文件名"
        ></el-table-column>

        <el-table-column
            prop="mobile"
            label="上传人"
            width="120"
        ></el-table-column>

        <el-table-column
            prop="fileuptime"
            label="上传时间"
            width="160"
        ></el-table-column>

        <el-table-column
        prop="fileuptime"
        label="操作"
        width="60"
        >
            <template slot-scope="scope">
                <el-button type="text" @click="openHandler(scope.row)">打开</el-button>
            </template>
        </el-table-column>
    </my-table>
</template>

<script>
export default {
    data() {
        return {
            tableData: [],
        };
    },
    methods: {
        queryData() {
            this.$get(`${this.$store.state.api.sysUrl}/file/bidding/plan/pglist.json`, {
                filetype: 'doc',
            }, data => {
                var tableData = data.list || [];

                this.tableData = tableData.filter(item => {
                    return item.isopen === '0';
                });
            });
        },
        openHandler(row) {
            this.$emit('open', row);
        },
    },
    mounted() {
        this.queryData();
    },
};
</script>